<html>
<head><meta charset="utf-8"><title>unpretty=mir even if borrowck fails · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/unpretty.3Dmir.20even.20if.20borrowck.20fails.html">unpretty=mir even if borrowck fails</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="220757438"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/unpretty%3Dmir%20even%20if%20borrowck%20fails/near/220757438" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/unpretty.3Dmir.20even.20if.20borrowck.20fails.html#220757438">(Dec 23 2020 at 03:04)</a>:</h4>
<p>I want to see the MIR emitted from some code that has a borrowck error. However, running <code>rustc -Z unpretty=mir</code> doesn't seem to emit anything if there were borrowck errors. How do I tell it that I still want it even if there are errors?</p>



<a name="220759657"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/unpretty%3Dmir%20even%20if%20borrowck%20fails/near/220759657" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/unpretty.3Dmir.20even.20if.20borrowck.20fails.html#220759657">(Dec 23 2020 at 04:08)</a>:</h4>
<p>Hmm, maybe it's not possible currently. For now I'm just removing the <code>?</code> early fail from this line: <a href="https://github.com/rust-lang/rust/blob/89886e69369b845463cf1b27abd536ce3adb7c78/compiler/rustc_driver/src/pretty.rs#L487">https://github.com/rust-lang/rust/blob/89886e69369b845463cf1b27abd536ce3adb7c78/compiler/rustc_driver/src/pretty.rs#L487</a></p>



<a name="220772339"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/unpretty%3Dmir%20even%20if%20borrowck%20fails/near/220772339" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tm <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/unpretty.3Dmir.20even.20if.20borrowck.20fails.html#220772339">(Dec 23 2020 at 09:15)</a>:</h4>
<p>It is possible with <code>-Zdump-mir=all</code></p>



<a name="220987826"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/unpretty%3Dmir%20even%20if%20borrowck%20fails/near/220987826" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/unpretty.3Dmir.20even.20if.20borrowck.20fails.html#220987826">(Dec 27 2020 at 01:41)</a>:</h4>
<p>I just want the MIR that's being fed into the borrow checker to be printed to stdout. <code>-Z dump-mir=all</code> makes a directory with a ton of files, and is overpowered for my use case.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>